package com.szh.publisher.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Component;


/**
 * 
 */
@Component
public class V3Producter {


    @Autowired
    private StreamBridge streamBridge;

    public String sendMessage(String meaasge){
        streamBridge.send("demoChannel-out-0",
                MessageBuilder.withPayload(meaasge).build());
        return null;
    }
}
